package com.example.routeplansystem.utils;


import com.example.routeplansystem.constant.ResponseMessage;
import com.example.routeplansystem.constant.ResponseStatus;
import com.example.routeplansystem.entity.dto.ResponseEntity;

public class ServiceUtil {
//
//    public static ResponseEntity checkServerExecuteFialResponseEntity(boolean flag) {
//        if (!flag) {
//            return new ResponseEntity<>(ResponseStatus.SUCCESS, "服务器错误", null);
//        }
//        return new ResponseEntity<>( ResponseStatus.SUCCESS, ResponseMessage.SUCCESSFUL_REQUEST,null);
//    }
//
//    public static ResponseEntity checkThreeServiceFialResponseEntity(boolean flag, String msg){
//        if (!flag) {
//            return new ResponseEntity<>(ResponseStatus.THREE_SERVICE_FILE, msg, null);
//        }
//        return new ResponseEntity<>( ResponseStatus.SUCCESS, ResponseMessage.SUCCESSFUL_REQUEST,null);
//    }
//
//    public static ResponseEntity checkAuthentationFialResponseEntity(boolean flag, String msg) {
//        if (!flag) {
//            return new ResponseEntity<>(ResponseStatus.AUTHENTATION_FIAL, msg, null);
//        }
//        return new ResponseEntity<>( ResponseStatus.SUCCESS, ResponseMessage.SUCCESSFUL_REQUEST,null);
//    }
//
//    public static ResponseEntity checkuserOperationFialResponseEntity(boolean flag, String msg) {
//        if (!flag) {
//            return new ResponseEntity<>(ResponseStatus.USER_OPERATION_ERROR, msg, null);
//        }
//        return new ResponseEntity<>( ResponseStatus.SUCCESS, ResponseMessage.SUCCESSFUL_REQUEST,null);
//    }
//
//    public static ResponseEntity serverExecuteFialResponseEntity() {
//        return new ResponseEntity<>(ResponseStatus.SERVER_EXCUTE_FAIL, "服务器错误", null);
//    }
//
//    public static ResponseEntity threeServiceFialResponseEntity(String msg){
//        return new ResponseEntity<>(ResponseStatus.THREE_SERVICE_FILE, msg, null);
//    }
//
//    public static ResponseEntity authentationFialResponseEntity(String msg) {
//        return new ResponseEntity<>(ResponseStatus.AUTHENTATION_FIAL, msg, null);
//    }
//
//    public static ResponseEntity userOperationFialResponseEntity(String msg) {
//        return new ResponseEntity<>(ResponseStatus.USER_OPERATION_ERROR, msg, null);
//    }
//
//    public static void checkSqlExecuted(boolean flag) {
//        if (!flag) {
//            throw new ServerException("服务器错误");
//        }
//    }


}
